var myFundsEcharts = {};
myFundsEcharts.pipChar=function(a,b,id){
	var myChart = echarts.init(document.getElementById(id));
	option = {
		    tooltip: {
		        trigger: 'item',
		        formatter: "{b}: ￥{c} ({d}%)"
		    },
		    color:['#008d4c','#c60'],
		    legend: {
		        orient: 'vertical',
		        x: 'left',
		        data:['可用资金','冻结资金'],
		        show:true
		    },
		    series: [
		        {
		            name:'资金分布',
		            type:'pie',
		            radius: ['50%', '70%'],
		            avoidLabelOverlap: false,
		            label: {
		                normal: {
		                    show: false,
		                    position: 'center'
		                },
		                emphasis: {
		                    show: true,
		                    textStyle: {
		                        fontSize: '12',
		                        fontWeight: 'bold'
		                    }
		                }
		            },
		            labelLine: {
		                normal: {
		                    show: false
		                }
		            },
		            data:[
		                {value:a, name:'可用资金'},
		                {value:b, name:'冻结资金'}
		            ]
		        }
		    ]
		};

        myChart.setOption(option,true);
    }